/*
*   CEPausableInterface.h
*   Prototype Template
*
*   Created by Alexander Trutchenko on 01.05.2012
*   Copyright LID 2012. All rights reserved.
*
*/

#ifndef __CE_PausableInterface_h__
#define __CE_PausableInterface_h__

namespace cocosext {

////////////////////////////////////////////////////////
//
/** CEPausableInterface
 * 
*/
////////////////////////////////////////////////////////

class CEPausableInterface
{
	unsigned int _pauseCounter;

protected:
	CEPausableInterface(): _pauseCounter(0) {;}

public:
	virtual ~CEPausableInterface() {;}

    // static constructor
    static CEPausableInterface* PausableInterface();

public:
	// Main interface
	void pause();
	void resume();
	inline bool isPaused() const { return (_pauseCounter > 0); }

protected:
	virtual void doPause() = 0;
	virtual void doResume() = 0;
};

} // namespace cocosext


#endif // __CE_PausableInterface_h__
